package vn.edu.hcmut.cse.ai.search.problems.blocksworld;

import vn.edu.hcmut.cse.ai.infrastructure.GoalTest;

public class BlocksWorldGoalTest implements GoalTest{

    private final BlocksWorldState goalState;
    
    public BlocksWorldGoalTest(BlocksWorldState goalState) {
        this.goalState = goalState;
    }
    
    @Override
    public boolean isGoalState(Object state) {
        BlocksWorldState blocksWorldState = (BlocksWorldState) state;
        return this.goalState.equals(blocksWorldState);
    }

    @Override
    public Object getGoalState() {
        return this.goalState;
    }
    
}
